// 隐藏滚动条
@mixin hideScrollBar {
  &::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

.chat-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;

  .chat-content {
    @include hideScrollBar;
    width: 100%;
    // height: 70vh;
    flex: 1;
    overflow-y: auto;
    background-color: #f8f8f8;
    padding: 20px 20px;
    box-sizing: border-box;

    .content-card {
      display: flex;
      justify-content: flex-start;

      &:not(:last-child) {
        margin-bottom: 30px;
      }

      .card-left,
      .card-right {
        // width: 10vw;
        // height: 10vw;

        .card-image {
          width: 100%;
          height: 100%;
          background-color: #fff;
          border-radius: 6px;
          overflow: hidden;

          img {
            width: 100%;
            height: 100%;
            vertical-align: middle;
            object-fit: cover;
          }
        }
      }

      .card-center {
        max-width: 31vw; // 60vw;
        margin: 0 10px;
        border-radius: 6px;
        background-color: #fff;
        position: relative;
        padding: 10px 10px;
        box-sizing: border-box;
        font-size: 16px;
        line-height: 22px;

        .arrow-content {
          position: absolute;
          left: -8px;
          top: 13px;
          width: 0;
          height: 0;
          border-top: 4px solid transparent;
          border-bottom: 4px solid transparent;
          left: -4px;
          border-right: 4px solid #fff;
          color: #141414;
        }

        .card-txt {}

        .card-href {
          .href-p {}

          .href-ul {
            margin-bottom: 20px;

            .href-li {
              color: #64679d;
              font-size: 30px;
            }
          }
        }
      }

      &.card-content-2 {
        justify-content: flex-end;

        .card-center {
          $customColor: #a8eb79;
          background-color: $customColor;

          .arrow-content {
            left: unset;
            border-right: unset;
            right: -8px;
            border-left: 8px solid $customColor;
          }
        }
      }
    }

    .content-loading {
      width: 100%;
      line-height: 30px;
      color: #ccc;
      font-size: 14px;
      text-align: center;
    }
  }

  .chat-tools {
    width: 100%;
    padding: 10px 0px;
    background-color: #fff;
    color: #333;

    .tools-textarea {
      width: 100%;
      display: flex;
      justify-content: center;

      .tools-left {
        margin: 0 15px;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      .tools-center {
        flex: 1;
      }

      .tools-right {
        margin: 0 15px;
        display: flex;
        justify-content: center;
        align-items: center;

        .right-send {
          border-radius: 8px;
          background-color: #67c465;
          color: #fff;
          font-size: 12px;
          text-align: center;
          padding: 1vh 3vw;
        }

        .right-icon {
          font-size: 20px;
          height: 30px;
        }
      }
    }

    .tools-opts {
      height: 20vh;
      padding-top: 10px;

      .opts-fontsize {
        width: 100%;
        padding: 0 15px;
        display: flex;
        align-items: center;

        .fontsize-label {
          font-size: 16px;
          color: #333;
          font-weight: bold;
          margin-right: 10px;
        }

        .fontsize-options {
          display: flex;
          align-items: center;

          .options-item {
            width: 50px;
            height: 25px;
            line-height: 25px;
            border-radius: 4px;
            border: 1px solid #ccc;
            font-size: 15px;
            text-align: center;
            margin-right: 10px;

            &.selected {
              color: #007aff;
              border-color: #007aff;
            }
          }
        }
      }
    }
  }
}

/* 在小屏幕上的样式和布局 */
@media (max-width: 767px) {
  .chat-container {

    .card-left,
    .card-right {
      width: 10vw;
      height: 10vw;
    }
  }
}

/* 在中等屏幕上的样式和布局 */
// @media (min-width: 768px) and (max-width: 991px) {

//   .chat-container {

//     .card-left,
//     .card-right {
//       width: 10vh;
//       height: 10vh;
//     }
//   }
// }

/* 在大屏幕上的样式和布局 */
@media (min-width: 768px) {

  .chat-container {
    width: 800px;
    // margin: 0 auto;

    .card-left,
    .card-right {
      width: 40px;
      height: 40px;
    }
  }
}